import { setCookie } from "@/libs/cookie";
import { useCallback } from "react"


const Header = () => {
    const onCheckout = useCallback(() => {
        setCookie("token", "");
        window.location.reload();
    }, []);
    return (
        <header className="h-16 mb-1">
            <div className="navbar h-16 bg-base-100">
                <div className="grow">
                    送餐管理系统
                </div>
                <div>
                    <span onClick={onCheckout} className="hover:text-blue-500 cursor-pointer">
                        退出登录
                    </span>
                </div>
            </div>
        </header>
    )
}
export default Header